#!/bin/bash
# Project: bash_tools
# Filename: filelock.lib.sh
# Autor: Wojciech Ornowski
# Date: 2012-05-19
# Version: 1.0
# Licence: 
#
# Describe: Biblioteka zawierająca funkcjonalność blokowania plików.
#
# Usage: Biblioteka. Załadowanie kodu w skrypcie przez . filelock.lib.sh
#
# Library postfix:  _765_loc dla zapewnienia sztucznej kapsulacji.
# 
# Includs: vector.lib.sh
. vector.lib.sh


# FUNCTION
# Name: printHelp_765_loc()
# Describe: Funkcja drukująca Help dla biblioteki
# Usage: printHelp_765_loc bez argumentów
# Exitcodes: -
printHelp_765_loc()
{
  echo ""
  echo "Library: filelock.lib.sh"
  echo "	Public: filelock_remove() filelock_set() filelock_exist() filelock_all() filelock_removeall()"
  echo "	Private: printHelp_765_loc()"
  echo ""
  echo "	Library postfix: _765_loc"
}


if [ $# == 2 ] && [ $1 == "-lib" ] && [ $2 == "filelock.lib.sh" ]; then
    printHelp_765_loc
fi

vec_new locks_765_loc

# FUNCTION
# Name: filelock_set()
# Describe: Blokuje wskazany plik. Jesli jest zablokowany 
# Usage: filelock_set filename
# Exitcodes: 1 if lock exist on this file 0 if lock hes been set successfully 2 if can't create the lock
filelock_set()
{
  if [ $# == 1 ]; then
    
  fi
  return 2
}

# FUNCTION
# Name: 
# Describe: 
# Usage: 
# Exitcodes:
#filelock_remove()
#{
#}

# FUNCTION
# Name: 
# Describe: 
# Usage: 
# Exitcodes:
#filelock_exist()
#{
#}

# FUNCTION
# Name: 
# Describe: 
# Usage: 
# Exitcodes:
#filelock_all()
#{
#}

# FUNCTION
# Name: 
# Describe: 
# Usage: 
# Exitcodes:
#filelock_removeall()
#{
#}
